using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PACKETPARSERMAX20.CORE;

namespace PACKETPARSERMAX20.CORE.DEFINITIONS
{
    public class SMSG_SPELLENERGIZELOG_DEF : DefinitionBase
    {

        public override bool Process()
        {
            ResetPosition();

            UInt64 victimguid = popGuid("victimguid");
            UInt64 guid = popGuid();
            UInt32 spellId = ReadUInt32();
            UInt32 powertype = ReadUInt32();
            UInt32 damage = ReadUInt32();

           // InitLog(); //start the log
            //if (LogIt) LogAppendLine("UInt64", "victimguid", victimguid, true);
            //if (LogIt) LogAppendLine("UInt64", "guid", guid, true);
            //if (LogIt) LogAppendLine("UInt32", "spellId", spellId);
            //if (LogIt) LogAppendLine("UInt32", "powertype", powertype);
            //if (LogIt) LogAppendLine("UInt32", "damage", damage);

            //  this is really by available bytes left?
            if (ClientBuild > 7561 && ClientBuild < 8089)
            {
                byte critical = ReadByte();
                //if (LogIt) LogAppendLine("byte", "critical", critical);
            }
 

            return Validate();
        }
    }
}
